﻿<UserControl
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
	x:Class="MVVMtutorialAdvanced.Author_UC"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
	mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="400"
	DataContext="{Binding Source={StaticResource App_ViewModelLocator}, Converter={StaticResource App_ViewModelNameToViewModelConverter}, ConverterParameter=MVVMtutorialAdvanced.Author_VM}"
>
	<!--DataContext="{Binding Path=Author_VM, Source={StaticResource App_ViewModelLocator}}"-->
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<sdk:DataGrid			
			ItemsSource="{Binding DomainDataSourceAuthors.DataView}" 
			AutoGenerateColumns="True" 
			RowDetailsVisibilityMode="VisibleWhenSelected"
			IsReadOnly="True"
		/>
		
		<StackPanel Orientation="Horizontal" Background="AliceBlue" Grid.Row="1">
			<Button Content="Edit" Command="{Binding CommandEdit}" />
			<Button Content="Add" Command="{Binding CommandInsert}" />
			<Button Content="Delete" Command="{Binding CommandDelete}" />
		</StackPanel>

		<toolkit:BusyIndicator BusyContent="Bitte warten ..." IsBusy="{Binding IsBusy}" Grid.RowSpan="2" />
	</Grid>
</UserControl>
